d-languages for sets and LOGSPACE computable graph transformers’
نویسندگان
چکیده
We discuss several versions of a set theoretic d-language as a reasonable prototype for “nested” database query language where database states and queries are considered, respectively, as hereditarily finite sets and set theoretic operations. In a previous work such a language exactly corresponding to PTIME-computability was introduced. It is supposed that HF-sets are naturally presented by vertices of acyclic graphs. Here we consider a number of languages for SubPTIME computable set operations via corresponding graph transformers. Two such languages lead to a notion of NLOGSPACE and, respectively, DLOGSPACE computable queries over HF which appear the most natural, at our present knowledge, among others considered here. Unlike the “flat” relational databases the problem of finding sufficiently good corresponding approach for HF proves to be more intricate and, furthermore, gives rise to some interesting questions in finite model theory (cf. Section 13). 1. General introduction Computability over sets (of tuples of sets of tuples of sets, etc.) or over “complex objects” is at present rather popular subject, especially in connection with “nested” databases. There may be distinguished two directions: typed (e.g. [l, 13, 19,221) and untyped (cf. [6-S, 26,30,32,34]) ones. The first is based on the direct product and powerset type constructs and presupposes, at least at the beginning, the hyperexponential (i.e. Kalmar elementary) computational complexity. Some additional special efforts are necessary to find restrictions (on the types height, ranges of variables, density/sparsity of data w.r.t. types [13]) giving rise to more tractabZe query languages. The second direction is not concerned with exponentiation because it is based on the notion HF of Hereditarily Finite Sets which may be axiomatized (of course, * Corresponding author. E-mail: {sazonov, lisitsa}@logic.botik.m. ’ Supported by RBRF (projects 93-011-16016 and 96-01-01717) and by INTAS (project 93-0972). 2 The final version of the paper was also prepared while the second author visited Princeton and Rutgers Universities (DIMACS) and Uppsala and Bern Universities in 1996. 0304-3975/97/$17.00 @ 1997 -Elsevier Science B.V. All rights reserved PIZ SO304-3975(96)00174-O 184 A. Lisitsa. V. Sazonoo I Theoreticul Computer Science I75 (1997) 183-222 non-categorically) without any reference to the powerset operation. The tractability of corresponding A-languages considered in [30-391 and below is achieved quite straightforward. Also some approach to types within this framework oriented to nested databases was outlined in [34]. We confine the discussion on the connection of HF-sets with databases to the above references and to a general note that nested and HF-like complex data structures seem conceptually very natural for a direct representation of any deeply structured information (cf. [34] for more details). This may be compared e.g. with natural numbers or finite strings of symbols or even “flat” relational structures which are more low-level notions. This paper is mainly concerned with computational and complexitytheoretic aspect of querying over HF, specifically, with an attempt to capture the class of (N)LOGSPACE-computable queries. It is a crucial problem how to represent HF-sets both in a real computer and in any mathematical model of computation such as Turing machine, i.e. we must have some encoding v : Codes -+ HF of the abstract data structure HF. A general theory of computability over any domain D w.r.t. some encoding v : Codes = Natural Numbers ---f D is presented in [9] as the so-called numbering theory. However, this approach was not originally concerned with complexity of computations. So, we must take into account subtle distinctions between many encodings which would be considered there as equivalent. In particular, we decide here and in the previous works to represent hereditarily finite sets by vertices of finite well-founded (= acyclic in the finite case) graphs G with edges u +G v corresponding to the membership relation E in HF. Previously considered versions of A-language describe exactly the class of all PTIME-computable operations over HF-sets w.r.t. corresponding (regular [37,35,38]) coding of sets, in particular, w.r.t. the graph encoding. (It is unclear which coding and which version of A-language are most “genuine”; cf. Concluding Remarks in [34]). Note that analogous representation of sets (of sets of sets .) by graphs was also used in [6,7,2]. However, in [2] it is considered rather unusual set theory with Antifoundation Axiom which says that arbitrary, even non-well-founded (and possibly infinite) graph with a distinguished vertex denotes a uniquely defined set in the so-called anti-well-founded universe of sets. 3 We consider corresponding approach in [36]. Unfortunately, it is rather expensive to recognize in general if any two vertices 01,712 of a graph G denote the same set in the universe HF. (This computational problem proves to be in PTIME but perhaps not in (N)LOGSPACE C PTIME due to its PTIMEcompleteness [6]. Such a procedure was one of the basic tools of PTIME realization of corresponding A-language [32,34,36].) That is why we are attempting here to find a reasonable restriction of this graph transformation approach for realizing a version of A-language without numerous identifications of vertices denoting the same set. In particular, we restrict ourselves to extensional acyclic graphs where no such identification is possible, and define several notions of a “computable” transformation 3 In such a universe there exists e.g. a (unique) set C2 satisfying the identity sz = (52). A. Lisitsa, V. Sazonovl Theoretical Computer Science 175 (1997) 183-222 185 of such graphs (what may be considered as a kind of evolving algebra approach [ 151) allowing to realize effectively, actually in (N)LOGSPACE, corresponding versions of the d-language. Our present task is to find such a A-language and encoding of sets which would correspond to (N)LOGSPACE as better as possible. After a number of intermediate results in Sections 5-8 we present in Sections 9 and 12 some reasonable solution of this task as Main Results, respectively, for the case of NLOGSPACE and (deterministic version of) LOGSPACE-computability over HF. More precisely, we have to confine ourselves to a class of (N)LOGSPACE-computable operations over HF satisfying some sufficiently natural and actually unavoidable additional requirements (defined also in terms of (N)LOGSPACE-computability). In particular, we get exactly all (N)LOGSPACE-predicates over HF without any restriction. However, the syntax of corresponding versions of A-language, being effective, has somewhat artificial form. It is interesting question, whether it can be presented as some extension of A by finite number of some operations or schemes (like primitive recursion) so that, moreover, all the constructs could be mutually axiomatized. The Main Results of Sections 9 and 12, as well as those (5)-( 11) of Section 8 and examples in Section 11 (based on some technical considerations on definability of linear order in Section lo), are new in comparison with the previous version of this paper [391). The expressive power of many other versions of A-language considered in this paper is also faithfully characterized in terms of corresponding classes of graph transformers, however less natural. So, even if exactly NLOGSPACE (with no restrictions such as mentioned above) is captured in (9),( lo), Section 8, the class of described operations is probably not closed under arbitrary compositions (unlike the approach presented in the Main Result). This is because in our encodings of HF-sets there is an essential difference between the codes of n-tuples of sets and n-tuples of codes of the same sets from the point of view of Sub-PTIME-computability. It proves that defining Sub-PTIME-computability over HF and corresponding notion of definability is more problematic task than in the case of “flat” databases [14, 17, 181. More precisely, our reduction of the “nested” case to the “flat” one involves some peculiar technical problems and considerations, especially for the case of Sub-PTIME. The main reason for this is a higher abstract level of HF-sets in comparison with the first-order finite structures. In fact, we reduce various versions of d-language to the language of first-order logic with a transitive closure operator FO@ over finite graphs. It was shown by Immerman [ 171 that in the presence of a linear order (4) this language (even closed under negations [18]; cf. also [41]) exactly corresponds to NLOGSPACE. It is also used as an analogous description of DLOGSPACE, i.e. deterministic LOGSPACE [ 171. The description of PTIME-computability over HF mentioned above is based on a similar approach to PTIME in terms of recursive “global” function(al)s in finite segments (0, 1,. . . , q 1,~) of natural numbers [14,27,28] or, essentially equivalently, in terms of recursive global predicates over finite linear ordered first-order structures [ 16,24,42]. The last version is usually symbolized as FO< + LFP = PTIME where 186 A. Lisitsa, V. SazonovlTheoretical Computer Science 175 (1997) 183-222 4 denotes any linear ordering of a finite domain and LFP (instead of @ above) is a least jixed point (i.e. recursion) operator. Note, that primitive recursion over (0, 1, . . . , o 1, q } corresponds to DLOGSPACE [ 141. Many considerations of this paper (which do not use < ur, a canonical linear order on HF) are also applicable to any reasonable set-theoretical universe V, possibly containing infinite sets. However, in this case, instead of (N)LOGSPACE-computability, we must consider only definability in the language FO and its versions like above FO@, FO + LFP, etc. The origins of A-language are as follows. A rather weak but natural and elegant class of set-theoretic operations, the so-called basic or rudimentary operations was considered in [ 11,201 with corresponding Basic Set Theory [Ill. Analogous “predicative” versions of set theory were discussed in [lo]. Such a set theory is quite sufficient for many elementary and every-day mathematical considerations. Basic operations constitute a proper subclass of Primitive Recursive Set Operations considered in [21]. It was shown in [l I] that basic predicates coincide with those definable by do-formulas [23] in the language {E}. It was proved in [30-321 that provably-total C-definable operations of KPo, Kripke-Platek set theory without foundation axiom (cf. [3]), coincide with these basic (rudimentary) operations. Moreover, it was proved in [32] that KPo is, nevertheless, a conservative extension of the only Extensionality Axiom relative to de-formulas. The class of basic operations and also the Basic Set Theory were extended in [30-391 to more reach versions called there A-language and A-set theory or Bounded Set Theory (by some analogy with Bounded Arithmetic; cf. e.g. [5,25,28]). Bounded Set Theory and its class of A-definable or, equivalently, provably computable operations over sets exactly correspond to PTIME-computability over HF. In this paper we consider the basic language of R. Gandy under the same name A and several of its extensions corresponding to (N)LOGSPACE-computability. 2. Preliminaries and technical introduction Remember that the universe HF of “pure” hereditarily finite sets is defined inductively as the least class of sets such that 0 E HF and if xi,. . ,x, E HF then 1x1 , . . . ,x,,} E HF Actually, for real database applications we have to consider, as in [34], a more general universe HF(d,%) with u-elements @ (or atoms) and attributes d: let % C HF(&, %) and if XI,. ,x, E HF(d, @) and Al,. . . ,A, E 1;9 then {A, : xl,..., A, : x,} E HF(&, %) where Ai : xi are elements xi labeled by the attributes Ai E &. (We may take & = @ = a set of some or all finite strings in an alphabet.) However, for simplicity we restrict ourselves here to the pure HF-sets. PTIME and, respectively, (N)LOGSPACE denote computability by a Turing machine in the polynomial time in the length of the input and, respectively, by a (nondeteiministic) Turing machine using the working tape of the length logarithmic in the length A. Lisitsa, V. Sazonovl Theoretical Computer Science 175 (1997) 183-222 187 of the input. The typical inputs and outputs for a Turing machine are finite strings in a finite alphabet or, slightly more general, finite graphs, etc. For definiteness we may use the denotation DLOGSPACE for (deterministic) LOGSPACE. It is well-known that DLOGSPACE & NLOGSPACE C PTIME and it is an open question whether s are, in fact, proper inclusions here [ 121. There is a problem of some ambiguity of the notion of Nondeterministic LOGSPACE-computability of functions in contrast to predicates: different nondeterministically chosen ways of computation may give different results. There is a reasonable direct approach to defining what is NLOGSPACE-computable function. However, we will actually work in terms of an equivalent notion of FO?-definability described below. The key notion for this paper is the following definition of (say, PTIMEor LOGSPACE-) computability of operations q : HF -+ HF over HF-sets, instead of finite strings. Here q(s) = a means informally, for any s,a E HF, that s is a database state and a is an answer to the query q asked about the state s. Let v : Codes + HF be any surjective encoding of states/answers. We say that q is (PTIME-, etc-) computable w.r.t. v if the following diagram: HF 5 HF Y T T 1' Codes 3 Codes commutes for some (PTIME-, etc.-) computable transformation Q between codes. In other words, q(v(c)) = v@(c)) holds for all c E Codes. For the case of PTIME or (N/D)LOGSPACE we must denote corresponding classes of set-theoretic operations like 9?Y9JZ& JV_~?J%YY&%~~ or %&?B9Y~V&,, to show that the corresponding notion of computability over HF depends on an encoding v. In the main case of graph encoding y considered below we will write 9?YY&& instead of ~VYJZ&~. (Note that JV_%!%Z~‘~&?&~ or 9_5?@??99~&%~ are very sensitive to small variations of this y.) Sometimes we have to consider computability of set-theoretical operations q : HF -+ HF with respect to d$tkrent encodings vi and v2 which serve for representation of inputs and outputs, respectively: HF -% HF VI T T Y2 Codes, -% Codes2 In general, let 5% denote some notion of computability over Codes, for example, corresponding to some complexity class. More precisely, % is a recursive set of programs in a reasonable programming language, such as the language of Turing machines. We associate with 59 the corresponding class of transformers Codes -+ Codes. Then define ce,“’ as the class of V-computable one-place operations (and predicates) over HF with respect to v. Some approaches to defining the class %?,, = U,%Y,?’ of %?-computable many-place operations will be discussed soon. 188 A. Lisitsa, V. Sazonov I Theoretical Computer Science 175 (1997) 183-222 Note that for any given algorithm Q : Codes -+ Codes (from a fixed class %?), it may be problematic to decide whether there exists (actually, unique) q making the above diagram commutative. We say that the class %$ of computable operations q over HF has an efictiue syntax if (at least) there exists a recursive (not necessary V-computable) family of programs Qn E ‘%‘, rc = 0, 1,. . ., with all corresponding qn E 5% existing and exhausting the class %&. (Here the programs Qn may not exhaust V.) Alternatively, we may let rr to range over formal expressions of a language L, instead of natural numbers. In this case qn and Qli may be considered, respectively, as denotational and operational semantics of any expression (program) rc in this language. In contrast to +J$ each L-program 7c will have a corresponding q. In this paper we shall take in the role of L suitable versions d’ of a natural set-theoretic language A (cf. Section 3) with a clear denotational semantics and with tractable operational semantics, say, in terms of NLOGSPACE-computability. Another problem consists (mainly for the case of 97 = (N)LOGSPACE) in defining a general and sufficiently closed class %$ of many-place V-computable operations over HF. To this end we must reasonably generalize v to the case of an encoding v, : Codes, + HF” of all m-tuples of HF-sets. Then %?-computability of m-place functions q will be defined in terms of the diagram: HF” A HF I’., T T 1' Codes,,, -% Codes with QE%? formally a one-place transformer of codes. The simplest choice is Codesm = Codesm, the set of m-tuples of Codes, and bz((Cl,...,G?J) = fY(Cl,...,Cm)> = (V(CI),..., v(c,)). But this choice is in general not the best one because, for a reasonable v, we cannot guarantee that the predicates v(c) = v(d) and v(c) E v(d) on c,d E Codes are V-decidable for a lower complexity class V, which is a very desirable condition. Nevertheless, it is possible that for some Codes2 # Codes* and v2 # v2 the corresponding (formally one-place) predicates (VZ(C))I = (v*(c))2 and (v~(c))I E( ( )) v2 c 2 are q-decidable on c E Codes*. Here (-); denotes ith projection of a tuple. Even if we are lucky in this choosing v2 and, in general, v, it is still problematic whether the resulting class Ce, is closed under compositions of many-place operations. Let us note that a sufficient condition for this is the existence of a transformer Z, in %? such that the diagram: HF” = HF” ,, “1 T T Ym Codes”’ A Codes, commutes. That is, we need an I,,, in V which computes a unique code of m-tuple of sets by any given codes of each of these sets. Unfortunately, we evidently cannot hope A. Lisitsa, V. Sazonovl Theoretical Computer Science I75 (1997) 183-222 189 on this for the case of m = 2 if, say, equality relation on HF is g-decidable w.r.t. ~2, but not v2. It proves reasonable (and even inevitable!) to consider also some inessentiully restricted version %Z’ of V so that 5?,! would be a better, more natural HF-analogue of %Z than ‘%1., having all closure properties we need.4 It is in this way, via some V’, we shall approach the notion of %?-computability over HF for the case ?Z = (N)LOGSPACE. Corresponding %” will be denoted (in Section 9) as IC(N)LOGSPACE. An important example of Codes for HF is the class of all finite acyclic pointed graphs (GIN), i.e. graphs G with no cycles and with a distinguished point (vertex) p in each. We often consider an m-tuple of points distinguished, what corresponds to our choice of Codes, in this case. Then ‘8 will define a class of computable graph transformers. Let y : ~223 -+ HF (or even y : 9’ + HF for any class 3 of graphs; cf. a generalization below) be Mostowski’s general collupsing operation (an encoding of HF-sets by graphs) which assigns a set y(G, p) E HF to each &$!? (G, p) in such a way that y(G, P) = {y(G P’) : P’ +G p for some (predecessor to p) point p’ of G}. In particular, if p has no predecessors in G then y(G, p) = 0. E.g. for G consisting just of three edges PI + p2 + p3 and PI --) p3 we have y( G, ~1) = 0, y( G, ~2) = (0) and Y(G ~3) = (0, (0)). We shall also write p EG q instead of p +G q and define formally any graph G as a first-order structure (IGl,+) with IG/ ‘t I s set of vertices and with the binary relation EG for its edges. Sometimes we will apply y to graphs with several kinds of edges (of various “colours”), i.e. with additional relations (such as a linear order +G on ICI), where EG is just the main graph relation. Even more general, we may consider that y(G, p) is defined also for any graph, not necessary acyclic. Just apply y to the initial ucyclic (or well-founded) part of G, denoted as WF( G). Here WF(G) Z$ ( W, EG / ,+,) with W C IGI the least set of vertices such that if for any fixed vertex y E IGI all its predecessors x -‘G y are in W then we must have also y E W. Let 3 be any class of finite pointed graphs, quite arbitrary or a special one such as 133, &3, &%d’3*, &&‘g: or &zZ3:, etc., defined below. Then the restriction of y to 3 defines corresponding encoding of HF-sets with Codes = 3 which will be called a graph encoding defined by 3. So, we could specify explicitly only 3. We define extensional finite graphs (4%) as those for which the ordinary settheoretic extensionality axiom holds: G k ‘v’uvx(v~ y)&V;lv~ ~(UEX) =+x = y, or, equivalently, different vertices ui # 212 in G must have different sets of predecessors, i.e. (0: v -fG n]} # {u: n +G 02). 4 Actually, the relation between 59 and its restricted version W’, as programming languages, may be more complex than the simple set inclusion W’ C V:. 190 A. Lisitsa, l! Sazonovi Theoretical Computer Science 175 (1997) 183-222 Let E-isomorphism between two graphs be any isomorphism with respect to the main binary relations of these first-order structures and the distinguished elements of these graphs. Sometimes we consider graphs G with a congruence relation =o (or MC )5 instead of the ordinary equality (identity). In this case we must consider an isomorphism between Gr and G2 rather as a relation ++ C IG] 1 x IG2 1 which preserves all relations on these graphs, including =G, and =G2, and the distinguished elements (and analogously for E-isomorphism). We may call such an isomorphism as generalized one, or isomorphism up to the congruence relation =G, in comparison with the ordinary (bijective) isomorphisms. Evidently, for E-isomorphic graphs (Gi, ~1) and (Gz, ~2) we have ~(GI,PI) = y(G~p2). A transitive subgraph of a graph G with the main binary relation EG is its full subgraph (A, EG 1~) for any subset A C ]G( satisfying the closure property u EG v & v E A + u E A. This is a direct analogy to the ordinary notion of transitive (sub)set of the universe (HF, E). We will denote transitive sets in HF as T, T’, etc. For any finite d9 the set T[G] c {y(G, p): pi ICI} . t IS ransitive in HF. Evidently, any finite extensional acyclic graph (&&“3) G is E-isomorphic (via general collapsing) to a unique transitive set T = T[G] E HF. We will often identify arbitrary &‘&9 G with T[G]. Note that if G = (/Cl; go,= ) G is any 2293 with =G an equivalence relation identifying exactly those vertices which denote the same HF-sets in T[G] according to the general collapsing then the latter may be not a congruence. However, we can easily define an extensional acyclic graph G’ = (IG’], EG’,=G’) isomorphic to T[G] (up to =G’) so that IG’l = ICI, and =o’ = =G is a congruence relation w.r.t. EC/. Just take xEG/ y = 3x’ EG y(x =G x’). It can be shown that E and = over HF are PTIME-computable w.r.t. encoding y : at’99 -+ HF. (More precisely, w.r.t. y2.) However, they are hardly computable in (N)LOGSPACE (due to PTIME-completeness of the corresponding problem for =; cf. [6]). Restricting y to E&Y & d2? and considering its corresponding versions ym : 8&Y,,, --) HF”‘, where E&9& (= Codes,) is the class of &iegs (=Codes) with an m-tuple of distinguished vertices, makes this problem computationally trivial: different vertices of any E&Y always denote different HF-sets. We will consider various transformations of transitive sets T I+ T’. They will be also represented by corresponding transformers G I+ G’ between &&‘Ys such that T = T[G] implies T’ = T[G’]. For example, in Section 4 we will take T’ = T u {q(Z): ZET} for any operation q(X) over HF of a special kind such that q(X) C T for all X E T. If q(x,y) = {x, y} then corresponding transformer G H G’ may be defined by IG’] + I GI u { l xy : x, y E I GI }, where l xy are new vertices, x --f l xy and y + l XY are new edges, and l XY =G’ l UV iff {x, y} = {u, a} as sets. Also let l xy =o’ z iff z has CXaCtly two predecessors x -+ z and y + z. 5 I.e. such equivalence relation =G that G /= x = x’ & y = y’ &n E y + x’ E y’, etc. A. Lisitsa, V. SazonovITheoretical Computer Science 175 (1997) 183-222 191 On the other hand, to define a graph transformer Q : G H G’ (determined up to a graph isomorphism) we may use the first-order language FO(E, =) over G (with E and interpreted as Go and =o) as a natural tool. In this case it is reasonable to consider ;‘, & ]Glk, EC, & IG)2k, =o’ G IG]*$ etc., for some k> 1, and define (G’I and EC’, =G’ by FO-formulas of k and 2k free variables, respectively, with the distinguished vertices of G used as individual constants. The distinguished vertices of G’ may be defined as some k-tuples of distinguished vertices of G. (To this end we have to consider that any &cP% G has at least two additional distinguished vertices pi #G ~2. Say, let p1 be the unique initial vertex, which has no predecessors and defines the empty set 8 in any c,!?L&‘~. Then let p2 have the only predecessor p1 -‘G p2 and define the singleton set {0}.) Alternatively, it may be easier to define distinguished vertices of G’ by any FOformulas cpi (X), . . . , c~,(X) such that G k 3!Zqi(n). 6 This approach to definability relies on the well known concept of first-order interpretations between theories or structures (cf. [17,40]). The same approach to definability of graph transformers may be considered for the following extension FO@ of the language FO. Just enrich FO by new predicate forming construct: for any definable relation 2Zy. cp(Z, j,Z) of two lists of variables X and v of the same length. We call it the “horizontal” transitive closure and define its meaning by [1Zy. cp(X, j)]@(U,fi) iff cp(U,Ui), cp(zii,&), . . . , &in, ii) for some na0 and Ui,..., U, (E ) GJ ). It may participate in any other formula as a predicate (both positively and negatively). The free variables 2, if any, serve as parameters. We shall also use more short, however ambiguous notation [cp(U, 6, .?)I@ for the formula [AX?. c&X, y,Z)]@(U, 6) when it is clear from the context which two lists of variables of equal length in cp are considered. For example, [(u, v) EZ]@, or even [(u, u) EZ@], denotes [Axy.(x, y) EZ]@(U, v). Note that to be &@‘9 is evidently FOB-definable property of graphs. We may consider also deterministic version 0 of transitive closure ~3 which works as 8 for any formula cp(X,j) when it defines a (partial) mapping X H j. Otherwise, applying o gives, say, the false predicate (or, alternatively, o preliminary corrects cp to make it “deterministic”). 6 Such a way of defining the distinguished vertices of G’ by the formulas pi is essentially equivalent to the above using tuples. So, given the tuples Cl,, , C,, we may take q,(X) e X = c;. Conversely, given G + 3! XCpi(X), i = 1,. , M, we may consider, without lost of generality, that there exist m tuples Cl,. , C, of the distinguished vertices of the original graph G such that G + -cpf(?,) and G /= C, = 5, ej V,?(cpi(X) = Cpi(X)) for all _i, j. This allows to consider _the following FO-definable bijection x (up to =c) between tuples: C, H di and di H C,, if G /= qr(di), and d H d if d f 5; and G b -q,(d) for all i. Then composing the given FO-definition of [G’l. E o, and =Q with OL results in a graph isomorphic to G’ with the distinguished vertices presented by the tuples Et,. , E,,,. 192 A. Lisitsa. V. Sazonovi Theoretical Computer Science 175 (1997) 183-222 FO@ and FO’ are essentially identical to the languages FO + TC and FO + DTC, respectively, considered in [17, 181. (Actually, in [17, 181, TC and DTC coincide with the rejexive versions of our @and O-constructs.) However, the denotation TC (and *) will be occupied in our paper for the “vertical” transitive closure in the universe of sets HF: UETC(U) = UE* u $ [Axy.x~y]@(u,v), i.e. we use TC and * just in connection with the relation E. Analogously, let E$$E$ for the main graph relation go. In general, let FO* denote a fragment of FO’ where @ may be applied onZy to the primitive predicates. (Of course, =* and +* coincide with = and <, respectively.) It is proved in [ 171 that the notion of definability in FO + positive @ in finite linear ordered structures is equivalent to NLOGSPACE-computability. Moreover, FO+ positive @ has the same expressive power in these structures as the full FO + 8, i.e. as FO@ [18]. This result is equivalent to the statement CoNLOGSPACE = NLOGSPACE (cf. also [41]) which have been widely believed previously as false. The same holds for FO’ and DLOGSPACE (where the equivalence of 0 and positive 0 is rather trivial). In particular, we have FO C DLOGSPACE. Therefore, we may freely interchange the notions FO?” and (N/D)LOGSPACE where -X denotes a linear order. We will need also an extension FO + LFP of the first-order language by the least fixed point construct the-least P . [P(X) H cp(X, P(X))] with P occurring in cp positively. This construct is based on an iterative computation the least predicate P satisfying the condition in the brackets and actually subsumes @ and 0. It was shown in [ 16,421 that definability in FO+ + LFP over finite (linear ordered) models exactly corresponds to PTIME-computability. Finally, we will use the abbreviations like &&“Z?;, &9*, etc., also with superscript x and subscript < to designate that the graphs considered involve additional relations for the transitive closure E*G of the main graph relation EG and, respectively, for any linear order on the vertices of a graph. The subscript < denotes the canonical linear order on any &Y&S G which is inherited from the linear order <ur defined below in Section 3 (due to isomorphism of G and T[G] C HF). 3. d-languages of set-theoretic operations Define inductively A*-formulas and A*-terms by the clauses (A*-terms) ::= (variables) 1 {a, b} 1 U a 1 {t(x): x ~(*)a & q(x)} (A* -formulas) ::=aE’*‘bIcp&ICIIcpV~IlqnI Yx E(*)acp(x) I 3x E(*)acp(x) where cp and $ are any A*-formulas, a, b and t are any A*-terms and x is a variable not free in a. The brackets around * mean that there are two versions of the membership A. Lisitsa, V. Sazonovl Theoretical Computer Science I75 (1997) 183-222 193 relation: E and its transitive closure E*. Then AZ-formulas are defined as those A*formulas involving only atomic terms (i.e. just variables). We write A (do) when * is not used at all. The sublanguage A corresponds to the basic [ 1 l] or rudimentary [20] operations. Note that our using the term A is not completely fixed in our different papers. In general, let A’ denote some reasonable, still “bounded”, extension of the class of basic operations. For example, the unrestricted powerset operation is considered as intuitively “unbounded”. We shall use A*-terms and formulas both as syntactic objects and as denotations of their values in HF. For example, A-separation {x E a: q(x)} for cp E A gives the set of all x in the set a for which q(x) holds and is a partial case of the construct {t(x): x E a & q(x)} = “the set of all values of t(x) such that . . .“. Also x E {a, 6) iff x = a or x = b, xEUa iff 3zEa(xEz) and E * is a transitive closure of the membership relation E on HF, i.e. x boy iff x E@ y iff x EX~ EX~ E. . . EX, E y for some na0 and xi,... ,x, in HF. The meaning of logical symbols & (“and”), V (“or”), 1 (“not”), V (“for all”), 3 (“exists”) is well known. Note that A*-formulas involve only bounded quantification Vx E(*) a and 3x E(*) a. That is why, according to traditions of mathematical logic, we use the name A for our language and A’, etc., for various versions. These bounded quantifiers have the same meaning as unbounded ones except the variable x ranges only over the set (denoted by) a. It follows that any A’-term t(i) defines a set-theoretic operation J. X . t(i) : HF” + HF. For example, we may define the transitive closure of a set y as TC(y) z$ {x: x boy}. Let us identify the values true and false, respectively, with sets 0 and (8). Then formulas q(x) may be also considered as a kind of set-theoretic terms (operations). So we could write q(X) = y for y E HF a truth value. More precisely speaking, any A’-formula cp may be represented in this sense as A’-term if cp then (8) else 8 where, in general, if 50 then tl else t2~l_{zE{tl,t2}:(cp+z=tl)&(~cp+z=t;!)}. Let us denote by 2jj E a.t(J) the graph of a function t(j) of arguments j restricted to the set a. More formally, 2j E a.t(j) is defined as the set in HF of ordered pairs { ((F),z): jj E a &z = t(y)} if j is nonempty list of variables. Otherwise, we let it coincide with t = t( ). Ordered singletons, pairs, triples, etc., are defined in A as (u) $ u, (U,V) = {{~}{u,v}} and (u,v,w) e ((u,v),w), etc. It follows that ((J),z) = (J,z). Note, that lJ(u,v) = {u,v} and f or any set of ordered pairs r the set of all the components of these pairs is defined in A as field(r) z$ U U r. ’ Then corresponding projections satisfying ((u, v))i = u and ((u, v))2 = v are A-definable by (W)I * lJ{XElJW: 3yEU w . w = (x, y)} and symmetrically for (w)2. Also let dam(r) C$ {(w),: wEfield( and range(r) z$ {(w)~: wEfield(r In particular, dom(iy E a.t(y)) = a. ’ Here the double union U U IS related to the above definition of ordered pairs 194 A. Lisitsa. V. Sazonovl Theoretical Computer Science 175 (1997) 183-222 For any list of d’-terms and d’-formulas f(j) = to(J), ti(jj), . . . , t,(v) we abbreviate ny E a.[f(J)] G %jEa.t&), RjEu.t,(y) )...) njEa.t,(y). If c( is graph of a function then we write, as usual, x(x) = n instead of (x, u) E CI and y E x(x) instead of 3a E fielda(y E u&a = a(x)). If x is actually a tuple (i) then we write ~((2) instead of LX(X) = u<(X)). It is easy to define d-term Apply(cc,x) whose value is a(x). As in [34], we may define in the d-language many other useful operations on sets, e.g. the cartesian product A x B, Cartesian power Ak and disjoint unions A + B and C,E, Ai of any two sets A and B and of a family of sets Aj, etc. (We shall use some of these notions also in a more general context than a d/-language.) As usual, any set g of ordered pairs may be considered as a (directed) graph with a pair (u, u) E g playing the role of an edge u +g v connecting the vertices u and U. Any pair (g, p) E HF with g being a graph and p its vertex is just a pointed gruph in the framework of set theory. If p @field(g) then it is considered as an isolated vertex. We will extensively use the fact that any d (*)-formula q is equivalent to a dr’formula [ 111. (Cf. also [32,37] for corresponding proof-theoretic considerations and formal reductions, as in lambda calculus, with dr) -formulas being normal forms for A(*)-formulas.) For example, the formula (u, u) = w is equivalent (and may serve as an abbreviation) to do-formula: 3s,pEw(vxEw(x =sv.x = p)&uEs&u,zjEp& VxEs(x = U)&VxEp(x = 24 vx = v)) and (u, U) E z is equivalent to 3w E z((u, v) = w). Analogously may be expressed w = U U, etc. A set T E HF is called transitive if Vy E TVx E y(x E T). Evidently, TC(x) is the least transitive set containing x as a subset. A quasi-ordinal is either the empty set 0 or a singleton whose transitive closure consists only of singletons and 0: Quasiord(x) z$ Vy E* {x}(y # 0 + 3!z(z E y)). Quasi-ordinals may be identified with the natural numbers by letting 0 G+ 0 and n+l s {n}. Any arithmetical operation on natural numbers induces corresponding operation on quasi-ordinals via this bijection. Quasi-ordinals constitute a transitive class. More popular in the classical set theory is the notion of ordinal. This is a transitive set whose all elements are also transitive sets. All finite ordinals may be obtained from 8 by the “successor” operation x’ = x U {x}. However, there are notions which are hardly definable in A*. For example, consider canonical or lexicographical linear ordering <HF on HF uniquely defined by the
منابع مشابه
Delta-Languages for Sets and LOGSPACE Computable Graph Transformers
We discuss several versions of a set theoretic-language as a reasonable prototype for \nested" data base query language where data base states and queries are considered, respectively, as hereditarily-nite sets and set theoretic operations. In a previous work such a language exactly corresponding to PTIME-computability was introduced. It is supposed that HF-sets are naturally presented by verti...
متن کاملOn the reducibility of sets inside NP to sets with low information content
We study whether sets inside NP can be reduced to sets with low information content but possibly still high computational complexity. Examples of sets with low information content are tally sets, sparse sets, P-selective sets and membership comparable sets. For the graph automorphism and isomorphism problems GA and GI, for the directed graph reachability problem GAP, for the determinant functio...
متن کاملThe Resolution of a Hartmanis Conjecture
Building on the recent breakthrough by Ogihara, we resolve a conjecture made by Hartmanis in 1978 regarding the (non) existence of sparse sets complete for P under logspace many-one reductions. We show that if there exists a sparse hard set for P under logspace many-one reductions, then P = LOGSPACE. We further prove that if P has a sparse hard set under many-one reductions computable in NC1, t...
متن کاملSparse Hard Sets for P: Resolution of a Conjecture of Hartmanis
Building on a recent breakthrough by Ogihara, we resolve a conjecture made by Hartmanis in 1978 regarding the (non-) existence of sparse sets complete for P under logspace many-one reductions. We show that if there exists a sparse hard set for P under logspace many-one reductions, then P = LOGSPACE. We further prove that if P has a sparse hard set under many-one reductions computable in NC1, th...
متن کاملSparse Hard Sets for P Yield Space-eecient Algorithms
In 1978, Hartmanis conjectured that there exist no sparse complete sets for P under logspace many-one reductions. In this paper, in support of the conjecture, it is shown that if P has sparse hard sets under logspace many-one reductions, then P DSPACE[log2 n]. The result is derived from a more general statement that if P has 2polylog sparse hard sets under poly-logarithmic space-computable many...
متن کامل